package chatclient.applets;



import chatclient.applets.Chat;
import chatclient.netio.AttrList;
import chatclient.netio.ClientAttr;
import chatclient.netio.Command;
import chatclient.netio.Event;

public class Boot2c extends Chat {

    public Boot2c() {
        super();
    }

    @Override
    public void sendCommand(Command command)
            throws Exception {
        command.getParams().add(new ClientAttr(ClientAttr.NUL, ""));
        super.sendCommand(command);
    }

    @Override
    public void doEvent(Event event) {
        if (event.getId() == Event.ADDEDCHATTER) {
            String boot = getParameter("boot");
            if (boot != null) {
                try {
                    AttrList attrlist = new AttrList();
                    attrlist.add(new ClientAttr(ClientAttr.NUL, boot));
                    super.sendCommand(new Command(Command.NUL, attrlist));
                } catch (Exception exception) {
                }
            }
        }
        super.doEvent(event);
    }
}
